package com.northpool.operator.param;

import java.math.BigDecimal;

/**
 * @class NumberParameter
 * @description 数值参数
 */
public class NumberParameter extends Parameter<BigDecimal> {
    public NumberParameter(BigDecimal value) {
        super(value);
        this.type = Type.NUMBER;
    }

    public NumberParameter(BigDecimal value, boolean isDefault) {
        super(value, isDefault);
        this.type = Type.NUMBER;
    }

    @Override
    public String getStringValue() {
        if (value != null) {
            return value.toPlainString();
        } else {
            return null;
        }
    }
}
